<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>
<%@ page import="java.util.*,
                 com.kylin.common.util.*,
                 com.kylin.common.paginate.DisplayPage,
                 com.kylin.module.ad.orm.*" %>
<br>
		<b>广告类型列表</b>
<br>
<mytag:MyActionMsg />
<table class='pageTable' cellspacing='0' cellpadding='0'> 
     <tr>
        <td class='pageTitle'>类型名称</td>
        <td class='pageTitle'>标识符</td>
        <td class='pageTitle'>显示方式</td>
        <td class='pageTitle'>媒体格式</td>
        <td class='pageTitle'>操作</td>
      </tr>
    <%
     if(request.getAttribute(Constants.KEY_REQUEST_RESULT) instanceof DisplayPage){
         DisplayPage dispage = (DisplayPage)request.getAttribute(Constants.KEY_REQUEST_RESULT);
         List list = dispage.getList();
         for(int i=0;i<list.size();i++){
         	if(list.get(i) instanceof ADType){
             ADType type = (ADType)list.get(i);
	%>
		<tr>
	        <td class='pageTd'><%=type.getName() %> </td> 
	        <td class='pageTd'><%=type.getMark() %> </td> 
	        <td class='pageTd'>
	        	<%
	        	if(ADType.SHOWTYPE_PUT.equals(type.getShowtype()) )
	        	    out.println("固定");
	        	else if(ADType.SHOWTYPE_ROLL.equals(type.getShowtype()) )
	        	    out.println("滚动"); 
	        	%> 
	        </td> 
	        <td class='pageTd'><%=type.getFiletype() %> </td> 
	        <td class='pageTd'><a href="/admin/ad/manageADType.do?CMD=editADType&id=<%=type.getId() %>">编辑</a> </td> 
	    </tr>
	<%             
			}else{
System.out.println("list.get(i)="+list.get(i));
			}
         }
     }
    %>  
</table>
<a href="/admin/ad/addADType.jsp" >增加类型</a>